package com.king.ribbon;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by king on 2018/03/07.
 */
@RestController
public class RibbonController {
    final
    RibbonService ribbonService;

    @Autowired
    public RibbonController(RibbonService ribbonService) {
        this.ribbonService = ribbonService;
    }

    @RequestMapping(value = "/info")
    public String hi(String name){

        if(name == null){
            name = "king";
        }

        return ribbonService.hiRibbon(name);
    }
}
